package com.suncloud.location.locationbysuncloud;

import android.content.Context;
import android.content.Intent;
import android.test.ActivityInstrumentationTestCase2;

/**
 * Created by Administrator on 2017/6/28 0028.
 */

public class MyTestActivity extends ActivityInstrumentationTestCase2<MainActivity> {

    private Context applicationContext;

    public MyTestActivity(Class<MainActivity> activityClass) {
        super(activityClass);
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        applicationContext = getActivity().getApplicationContext();
    }

    public void testStartActivity() throws Exception{
        Intent intent = new Intent(applicationContext,LoginActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        applicationContext.startActivity(intent);
    }

}
